package com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.pizza;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.pizza
 * @Author: Del
 * @CreateTime: 2025-06-03  00:54
 * @Description: 抽象工厂模式实现  --- 抽象披萨类
 * @Version: 1.0
 */
public abstract class Pizza {

    // 披萨名字
    protected  String name;

    // 准备原材料，不同的披萨不一样，因此，我们先做成抽象方法
    public abstract void prepare();

    public void bake(){
        System.out.println(name + " baking;");
    }

    public void cut(){
        System.out.println(name + " cutting;");
    }

    public void box(){
        System.out.println(name + " boxing;");
    }

    public void setName(String name){
        this.name = name;
    }
}
